home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / VISUALBA / VB_SMPL.ZIP / DB-XL.EXE / DB-XL.FRM next >
Text File  |  1994-04-07  |  14KB  |  484 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   5460
  7.    ClientLeft      =   750
  8.    ClientTop       =   1530
  9.    ClientWidth     =   6735
  10.    Height          =   5865
  11.    Left            =   690
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   5460
  14.    ScaleWidth      =   6735
  15.    Top             =   1185
  16.    Width           =   6855
  17.    Begin FileListBox File2 
  18.       Height          =   1200
  19.       Left            =   4080
  20.       TabIndex        =   24
  21.       Top             =   720
  22.       Visible         =   0   'False
  23.       Width           =   975
  24.    End
  25.    Begin PictureBox Picture2 
  26.       Align           =   2  'Align Bottom
  27.       BackColor       =   &H00C0C0C0&
  28.       Height          =   255
  29.       Left            =   0
  30.       ScaleHeight     =   225
  31.       ScaleWidth      =   6705
  32.       TabIndex        =   22
  33.       Top             =   5205
  34.       Width           =   6735
  35.       Begin Label Label7 
  36.          AutoSize        =   -1  'True
  37.          BackStyle       =   0  'Transparent
  38.          Caption         =   "Label7"
  39.          Height          =   192
  40.          Left            =   120
  41.          TabIndex        =   23
  42.          Top             =   0
  43.          Width           =   576
  44.       End
  45.    End
  46.    Begin PictureBox Picture1 
  47.       AutoSize        =   -1  'True
  48.       Height          =   1635
  49.       Left            =   4320
  50.       Picture         =   DB-XL.FRX:0000
  51.       ScaleHeight     =   1605
  52.       ScaleWidth      =   2370
  53.       TabIndex        =   21
  54.       Top             =   240
  55.       Width           =   2400
  56.    End
  57.    Begin TextBox Text1 
  58.       Height          =   372
  59.       Left            =   1920
  60.       TabIndex        =   20
  61.       Text            =   "Text1"
  62.       Top             =   1200
  63.       Width           =   2052
  64.    End
  65.    Begin CommandButton Command3 
  66.       Cancel          =   -1  'True
  67.       Caption         =   "Exit"
  68.       Height          =   492
  69.       Left            =   4320
  70.       TabIndex        =   18
  71.       Top             =   4320
  72.       Width           =   1932
  73.    End
  74.    Begin FileListBox File1 
  75.       Height          =   1200
  76.       Left            =   4320
  77.       TabIndex        =   9
  78.       Top             =   2280
  79.       Width           =   1935
  80.    End
  81.    Begin DirListBox Dir1 
  82.       Height          =   1752
  83.       Left            =   2040
  84.       TabIndex        =   8
  85.       Top             =   2280
  86.       Width           =   1932
  87.    End
  88.    Begin DriveListBox Drive1 
  89.       Height          =   288
  90.       Left            =   4320
  91.       TabIndex        =   12
  92.       Top             =   3720
  93.       Width           =   1932
  94.    End
  95.    Begin Frame Frame1 
  96.       BackColor       =   &H00C0C0C0&
  97.       Caption         =   "Database"
  98.       Height          =   2892
  99.       Left            =   240
  100.       TabIndex        =   0
  101.       Top             =   1920
  102.       Width           =   1452
  103.       Begin OptionButton Option1 
  104.          BackColor       =   &H00C0C0C0&
  105.          Caption         =   "Paradox 3.x"
  106.          Height          =   252
  107.          Index           =   6
  108.          Left            =   120
  109.          TabIndex        =   7
  110.          Top             =   2520
  111.          Width           =   1212
  112.       End
  113.       Begin OptionButton Option1 
  114.          BackColor       =   &H00C0C0C0&
  115.          Caption         =   "Btrieve"
  116.          Height          =   252
  117.          Index           =   5
  118.          Left            =   120
  119.          TabIndex        =   6
  120.          Top             =   2160
  121.          Width           =   1212
  122.       End
  123.       Begin OptionButton Option1 
  124.          BackColor       =   &H00C0C0C0&
  125.          Caption         =   "FoxPro 2.5"
  126.          Height          =   252
  127.          Index           =   4
  128.          Left            =   120
  129.          TabIndex        =   5
  130.          Top             =   1800
  131.          Width           =   1212
  132.       End
  133.       Begin OptionButton Option1 
  134.          BackColor       =   &H00C0C0C0&
  135.          Caption         =   "FoxPro 2.0"
  136.          Height          =   252
  137.          Index           =   3
  138.          Left            =   120
  139.          TabIndex        =   4
  140.          Top             =   1440
  141.          Width           =   1212
  142.       End
  143.       Begin OptionButton Option1 
  144.          BackColor       =   &H00C0C0C0&
  145.          Caption         =   "dBase IV"
  146.          Height          =   252
  147.          Index           =   2
  148.          Left            =   120
  149.          TabIndex        =   3
  150.          Top             =   1080
  151.          Width           =   1212
  152.       End
  153.       Begin OptionButton Option1 
  154.          BackColor       =   &H00C0C0C0&
  155.          Caption         =   "dBase III"
  156.          Height          =   252
  157.          Index           =   1
  158.          Left            =   120
  159.          TabIndex        =   2
  160.          Top             =   720
  161.          Width           =   1212
  162.       End
  163.       Begin OptionButton Option1 
  164.          BackColor       =   &H00C0C0C0&
  165.          Caption         =   "Access 1.x"
  166.          Height          =   252
  167.          Index           =   0
  168.          Left            =   120
  169.          TabIndex        =   1
  170.          Top             =   360
  171.          Width           =   1212
  172.       End
  173.    End
  174.    Begin ComboBox Combo1 
  175.       Height          =   288
  176.       Left            =   1920
  177.       Style           =   2  'Dropdown List
  178.       TabIndex        =   10
  179.       Top             =   240
  180.       Width           =   2052
  181.    End
  182.    Begin CommandButton Command1 
  183.       Caption         =   "Convert"
  184.       Default         =   -1  'True
  185.       Height          =   492
  186.       Left            =   2040
  187.       TabIndex        =   11
  188.       Top             =   4320
  189.       Width           =   1932
  190.    End
  191.    Begin Label Label6 
  192.       BackStyle       =   0  'Transparent
  193.       Caption         =   "To Spreadsheet:"
  194.       Height          =   252
  195.       Left            =   360
  196.       TabIndex        =   19
  197.       Top             =   1200
  198.       Width           =   1452
  199.    End
  200.    Begin Label Label5 
  201.       BackStyle       =   0  'Transparent
  202.       Caption         =   "Label5"
  203.       Height          =   252
  204.       Left            =   1920
  205.       TabIndex        =   17
  206.       Top             =   720
  207.       Width           =   2292
  208.    End
  209.    Begin Label Label4 
  210.       BackStyle       =   0  'Transparent
  211.       Caption         =   "From Database:"
  212.       Height          =   252
  213.       Left            =   360
  214.       TabIndex        =   16
  215.       Top             =   720
  216.       Width           =   1452
  217.    End
  218.    Begin Label Label3 
  219.       BackStyle       =   0  'Transparent
  220.       Caption         =   "Convert Table:"
  221.       Height          =   252
  222.       Left            =   480
  223.       TabIndex        =   15
  224.       Top             =   240
  225.       Width           =   1332
  226.    End
  227.    Begin Label Label2 
  228.       BackStyle       =   0  'Transparent
  229.       Caption         =   "Database or Table:"
  230.       Height          =   252
  231.       Left            =   4320
  232.       TabIndex        =   14
  233.       Top             =   1920
  234.       Width           =   1932
  235.    End
  236.    Begin Label Label1 
  237.       BackStyle       =   0  'Transparent
  238.       Caption         =   "Path of Database:"
  239.       Height          =   252
  240.       Left            =   2040
  241.       TabIndex        =   13
  242.       Top             =   1920
  243.       Width           =   1932
  244.    End
  245. End
  246. 'This sample program shows you how to combine programming
  247. 'with database objects and ole automation objects.
  248. 'This program will convert a table in a database that
  249. 'the user selects, and then places it into an excel
  250. 'spreadsheet using OLE automation.
  251.  
  252. 'This program assumes that you have registered Excel version
  253. '5.0 in your registration database (REG.DAT) and that
  254. 'you installed the database component for Visual Basic 3.0
  255. 'Professional.
  256.  
  257. Dim db As database     'form level database object
  258. Dim Connect$           'Hold connect arguments
  259.  
  260. Sub CheckEnableConvert ()
  261.  
  262. 'check if table is selected and filename specified
  263. If (combo1.Text <> "") And